const verify = _that => {
  var that = _that;
  var nameVal = that.data.nameVal.replace(/\s/g, '');
  if (!/^[^ ]+$/.test(nameVal) || nameVal == '') {
    wx.showToast({
      title: '请输入姓名~',
      icon: "none",
      duration: 800
    });
    that.setData({
      nameVal: ''
    })
    return
  }
  var telVal = that.data.telVal.replace(/\s/g, '');
  if (!/^1(3|4|5|6|7|8|9)\d{9}$/.test(telVal)) {
    wx.showToast({
      title: '请输入正确的手机号码~',
      icon: "none",
      duration: 800
    });
    that.setData({
      telVal: ''
    })
    return
  }
}

module.exports = {
  verify: verify
}